<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){alert(data);
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
  </script>
   <div class="h"><a href="{:U('index')}" class="btn btn-info"><i class="glyphicon glyphicon-circle-arrow-left"></i> 返回列表</a>
 </div>
    <form class="checkoutform" action="{:U('insert')}" method="post">
    
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
        <div class="form-group">
      <label class="col-sm-2 control-label">标题</label>
      <div class="col-sm-10">
         <input class="form-control" datatype="*" name="name" type="text" id="title" value="{$info.name}">
      </div>
   </div>
       
      </if>
      <div class="form-group">
      <label class="col-sm-2 control-label">图片</label>
      <div class="col-sm-10">
       <input type="hidden" name="img_url"  value="{$info.img_url}" /><iframe width="400" height="40" scrolling="no" frameborder="0" src="{:U('upload')}"></iframe><a href="javascript:void(0);" onclick="del_img();">删除图片</a>
      </div>
   </div>
      
      
      <div class="form-group">
      <label class="col-sm-2 control-label">显示</label>
      <div class="col-sm-10">
         <label class="checkbox-inline"> <input name="status" type="radio" id="is_nav_8" value="1" checked="checked" />
          是</label>
          <label class="checkbox-inline">  <input name="status" type="radio" id="is_nav_9" value="0" />
          否</label></td>
      </div>
      </div>
      
        <div class="pages"><button type="submit" class="btn btn-success">提交</button></div>
      </table>
    </form>
  </div>
  <div class="clear"></div>
</div>
</body></html>